import service from '@/utils/request'

import {ApiResponse,ListApiResponse} from '@/store/dataType.ts'
export const API_POST = {
  // 查询岗位列表
  listPost:(query:any):Promise<ListApiResponse> => {return service.get('/system/post/list',{params: query})},


  // 查询岗位详细
  getPost:(postId:string | number):Promise<ApiResponse> => {return service.get('/system/post/' + postId)},


  // 新增岗位
  addPost:(data:any):Promise<ApiResponse> =>  {return service.post('/system/post',data)},


  // 修改岗位
  updatePost:(data:any):Promise<ApiResponse> => {return service.put('/system/post',data)},


  // 删除岗位
  delPost:(postId:string | number):Promise<ApiResponse> =>  {return service.delete('/system/post/' + postId)}

}


